from django.shortcuts import render,HttpResponse


# Create your views here.
def home(request):
    return HttpResponse ("路由测试")
def news(request,nid):
    print(nid)
    return HttpResponse("新闻信息")

def article(request):
    nid=request.GET.get("app")
    print(nid)
    if int(nid) > 9:
        return HttpResponse("页面数值过大")
    else:
        return HttpResponse("能够正常显示")

def comment(request,year):
    print(year)
    return HttpResponse(f"今年是{year}")

def party(request,member):
    print(member)
    return HttpResponse(f"欢迎{member}来参加聚会")

def users(request,xx):
    print(xx)
    return HttpResponse("这是正则路由的写法，匹配数字")
def account(request,xid):
    print(xid)
    return HttpResponse("正则匹配一个或多个单词字符组成的字符串")

def video(request,chapter):
    print(chapter)
    return HttpResponse("正则传入字符-数字的写法")
def audio(request,xid,yid):
    print(xid,yid)
    return HttpResponse("正则传入两个参数的写法")
def recoder(request,xxid,yyid):
    print(xxid,yyid)
    return HttpResponse("给两个参数起个名字")
def auth(request):
    return HttpResponse("这个是分发到web的auth")